/*
 * 人人信用管理有限公司版权所有.
 * 
 * @Description:
 * 
 * @author: liyuliang
 * 
 * @date: 20 Apr 2017 10:44:16 am
 * 
 * 注意：本内容仅限于人人信用管理有限公司内部传阅，禁止外泄以及用于其他的商业目的.
 */

package com.rrx360.common.model;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

import org.hibernate.annotations.Where;

@MappedSuperclass
public abstract class BaseEntity implements Auditable, OptimisticLocker, Idable, SoftDeleteAble {

  protected Serializable id;

  private Integer versionLock;

  private Timestamp createdOn;

  private Timestamp updatedOn;

  private Long createdBy;

  private Long updatedBy;

  private boolean deleted;

  public void setId(Serializable id) {
    this.id = id;
  }

  @Version
  public Integer getVersionLock() {
    return versionLock;
  }

  public void setVersionLock(Integer versionLock) {
    this.versionLock = versionLock;
  }

  public Timestamp getCreatedOn() {
    return createdOn;
  }

  public void setCreatedOn(Timestamp createdOn) {
    this.createdOn = createdOn;
  }

  public Timestamp getUpdatedOn() {
    return updatedOn;
  }

  public void setUpdatedOn(Timestamp updatedOn) {
    this.updatedOn = updatedOn;
  }

  public Long getCreatedBy() {
    return createdBy;
  }

  public void setCreatedBy(Long createdBy) {
    this.createdBy = createdBy;
  }

  public Long getUpdatedBy() {
    return updatedBy;
  }

  public void setUpdatedBy(Long updatedBy) {
    this.updatedBy = updatedBy;
  }

  public boolean isDeleted() {
    return deleted;
  }

  public void setDeleted(boolean deleted) {
    this.deleted = deleted;
  }

}
